package com.asy.ui.base;

import com.xinzhang.R;
import android.view.View;  
import android.widget.ImageView;  
import android.widget.LinearLayout;
 
  
public class ViewCache {  
  
        private View baseView;  
        private ImageView imageView;  
        private int width;
        
        public ViewCache(View baseView) {  
            this.baseView = baseView;  
        }  
  
//        public TextView getTextView() {  
//            if (textView == null) {  
//                textView = (TextView) baseView.findViewById(R.id.text);  
//            }  
//            return textView;  
//        }  
 
        public ImageView getImageView() {  
            if (imageView == null) {  
                imageView = (ImageView) baseView.findViewById(R.id.image);  
                LinearLayout.LayoutParams topLayoutParams=new LinearLayout.LayoutParams(width,width);
                imageView.setLayoutParams(topLayoutParams);
            }  
            return imageView;  
        }

		
		public void setWidth(int width) {
			this.width = width;
		}  
  
}  